#include <func.h>

int main(int argc,char *argv[])
{
    ARGS_CHECK(argc,3);
    int fdr=open(argv[1],O_RDWR);
    ERROR_CHECK(fdr,-1,"open");
    int ret;
    char buf[20];
    //ret=read(fdr,buf,sizeof(buf));
    //ERROR_CHECK(ret,-1,"read");
    //puts(buf);
    memset(buf,0,sizeof(buf));
    strcpy(buf,argv[2]);
    ret=write(fdr,buf,sizeof(buf));
    ERROR_CHECK(ret,-1,"write");
    //puts(buf);
    return 0;
}

